<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/base/common.jsp" %>
<%@ taglib uri="/struts-tags" prefix="s" %> 
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑新闻</title>
<link rel="stylesheet" href="${root }/css/public.css"/>
<script type="text/javascript" src="${root }/js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="${root }/js/ckeditor/ckeditor.js" charset="utf-8"></script>
<script type="text/javascript" src="${root }/js/module/common/common.js"></script>
<script type="text/javascript" src="${root }/js/module/newsinfo/newsinfo.js"></script>
<script type="text/javascript" src="${root }/js/win_layer/win_layer.js"></script>
<script type="text/javascript" src="${root }/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
/*DOM加载完成后执行*/
$(document).ready(function()
{
   initErrorMsg();
   var cke = CKEDITOR.replace("content",{toolbar:'Full',uiColor :'#D2E9FF',width:'600'} );
});
document.onkeydown=keyDownQuery; 
</script>
</head>
<body>
   <form class="add_news_pop" action="newsInfoAdminAction_editNewsInfo.action" theme="simple" id="editNewsInfo"
      enctype="multipart/form-data" method="post" namespace="/newsinfo">
        <s:hidden name="operateStatus" id="operateStatus"></s:hidden>
        <s:hidden name="newsInfo.newsId" id="newsId"></s:hidden>
        <dl class="clearfix"><dt>标题:</dt><dd><s:textfield name="newsInfo.title" id="title" style="width:677px" class="input" maxlength="50"></s:textfield></dd></dl>
        <dl class="clearfix"><dt>概述:</dt><dd><s:textarea name="newsInfo.summary" id="summary" style="width:677px" class="descript" maxlength="100"></s:textarea></dd></dl>
        <dl class="clearfix"><dt>上传图片:</dt><dd><s:file id="file" name="picFile" onchange="fileChange()"></s:file>&nbsp;
         <strong>当前图片：</strong>
		       <s:if test="newsInfo.picFileName == null">暂未上传图片</s:if>
		       <s:else>
			       <s:if test="newsInfo.picFileName.length()>41"><s:property value="'...'+newsInfo.picFileName.substring(newsInfo.picFileName.length()-40,newsInfo.picFileName.length())"/></s:if>
			       <s:else><s:property value="newsInfo.picFileName"/></s:else>
	           </s:else>
         &nbsp;</font><p>(只能上传 .jpg/.jpeg/.png 格式的图片，建议宽高比尽量为3:2)</p></dd></dl>
        <dl class="clearfix"><dt>关键词:</dt><dd><s:textfield name="newsInfo.keyWords" id="keyWords" style="width:677px" class="input" maxlength="50"></s:textfield></dd></dl>
        <dl class="clearfix"><dt>描述:</dt><dd><s:textfield name="newsInfo.description" id="description" style="width:677px" class="input" maxlength="100"></s:textfield></dd></dl>
        <dl class="clearfix"><dt>类型:</dt><dd><s:select list="#{1:'站内公告',2:'理财课堂',3:'头条新闻'}" id="type" name="newsInfo.type" label="abc" listKey="key" listValue="value"  headerKey="" headerValue="请选择"></s:select></dd></dl>
        <dl class="clearfix"><dt>平台:</dt><dd><s:property value="newsInfo.plateformName"/>&nbsp;</dd></dl>   
        <dl class="clearfix"><dt>推荐:</dt><dd><s:radio list="%{#{1:'推荐',0:'不推荐'}}" id="recommend" name="newsInfo.recommend" value="newsInfo.recommend" listKey="key" listValue="value"  theme="simple"  ></s:radio></dd></dl>
        <dl class="clearfix"><dt>允许被评论:</dt><dd><s:radio list="%{#{1:'允许',0:'不允许'}}" id="canDiscuss" name="newsInfo.canDiscuss" value="newsInfo.canDiscuss" listKey="key" listValue="value"  theme="simple"  ></s:radio></dd></dl>
        <dl class="clearfix"><dt>是否发布:</dt><dd><s:radio list="%{#{1:'是',0:'否'}}" id="status" name="newsInfo.status" listKey="key" value="newsInfo.status" listValue="value"  theme="simple"  ></s:radio></dd></dl>
        <dl class="clearfix"><dt>内容：</dt><dd><s:textarea name="newsInfo.content" style="width:677px" id="content" class="descript"></s:textarea></dd></dl>
        <div class="add_news_btn clearfix" style="padding-bottom:30px;"><a href="javascript:editNewsInfo();" class="btn1" style="margin-left:94px;">确定</a><a href="javascript:exit();" class="btn4">取消</a><a href="javascript:viewArticle();" class="btn2">预览</a></div>
   </form>
   <jsp:include page="/WEB-INF/view/newsinfo/viewNewsInfo.jsp"/> 
</body>
</html>
